//app.js

App({

  onLaunch: function () {
   // 展示本地存储能力   
   var that = this;
   //获取屏幕设备属性   
   wx.getSystemInfo({
     success: e => {
      // console.log(e)
       that.globalData.StatusBar = e.statusBarHeight;
       let custom = wx.getMenuButtonBoundingClientRect();
       that.globalData.Custom = custom;
       let CustomBar = custom.bottom + custom.top - e.statusBarHeight;
       if (CustomBar < 0) {
         CustomBar = 80
       }
       that.globalData.CustomBar = CustomBar;
       //console.log(that.globalData.CustomBar)

       //适配全面屏底部距离
       if (CustomBar > 75) {
         that.globalData.tabbar_bottom = "y"
       }

     },
     fail: e => {
       console.log('failed ')
       that.globalData.StatusBar = 22
       that.globalData.CustomBar = 66
       that.globalData = false
     }
   })

  

   
  
 },


 globalData: {
   userInfo: null,    
   Custom: null,
   StatusBar: '20',
   CustomBar: '65',
   tabbar_bottom: '',
   state: true,
   url:'https://csfg.heyishe.cn/',
   rootimgurl:'https://bucket-csfg.oss-cn-shenzhen.aliyuncs.com/' 
 }

})